package com.liam.design.decorator.decorator;

import com.liam.design.decorator.component.Drink;

/**
 * 抽象装饰者，继承自Component，从外类来扩展ConcreteComponent。对于ConcreteComponent来说，不需要知道Decorator的存在，Decorator是一个接口或抽象类
 *
 */
public abstract class DrinkDecorator implements Drink {

    private Drink drink;

    public DrinkDecorator(Drink drink) {
        this.drink = drink;
    }

    public String getName() {
        return drink.getName();
    }

    public double getPrice() {
        return drink.getPrice();
    }
}
